import { Column, Entity, OneToMany, PrimaryGeneratedColumn } from 'typeorm';
import { User } from '../../user/entities/user.entity';

@Entity()
export class Friend {
  @PrimaryGeneratedColumn()
  id: number;

  @OneToMany(() => User, (user) => user.friend)
  friend: User[];

  @Column({ default: null })
  user: string;

  @Column({ default: false })
  isGroup: boolean;

  @Column('simple-array', { default: null })
  groupItem: string[];

  @Column({ default: null })
  groupCode: string;

  @Column({ default: null })
  groupName: string;
}
